<template>
	<view>
		<carHeader :title="'门店详情'"></carHeader>
		<view class="container">
			<image src="https://fc1tn.baidu.com/it/u=1862534014,2374485642&fm=202&src=766&fc=tdmatt&mola=new&crop=v1"
				mode="widthFix" style="border-radius: 30rpx;"></image>
			<!-- 文字和电话图标部分 -->
			<view class="context">
				<view class="left">
					<view class="bot-name">
						中国石油加油站(解放路店)
					</view>
					<view class="bot-time">
						营业时间: 周一至周五 早上8:00-晚上22:00
					</view>
					<view class="bot-address">
						位置：山阳区人民路与解放路交叉口
						<image class="plane" src="/static/车联网服务-05就近加油_slices/plane.png" mode="widthFix"
							@click="daohang">
					</view>
				</view>
				<view class="right">
					<u-icon name="phone" class="right-img" size="36" color="#1A73ED" @click="phoneHelp"></u-icon>
				</view>
			</view>
		</view>
		<!-- 油价详情 -->
		<view class="youjia-details">
			<view class="font1">
				油价详情
			</view>
			<view v-for="(item, index) in prices" :key="index" class="font2">
				<text>{{ item.type }}# </text>
				<text style="color: #FFC06F;">￥{{ item.price }}/L</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name: "中国石油加油站",
				address: "山阳区人民路与解放路交叉口",
				prices: [{
						type: '92',
						price: 5.86
					},
					{
						type: '95',
						price: 5.86
					},
					{
						type: '98',
						price: 5.86
					},
					{
						type: '0',
						price: 5.86
					}
				]
			}
		},
		methods: {
			// 	点击小飞机-->导航
			daohang() {
				uni.navigateTo({
					/* 这里暂且传的是第一个数组的值 */
					url: "/pages/jiujinjiayou/daohang?name=" + this.name + "&address=" + this.address,
				})
			},
			phoneHelp() {
				console.log("电话求助！");
			}
		}
	}
</script>

<style lang="scss">
	.container {
		border-radius: 30rpx;
		width: 84%;
		background-color: #fff;
		position: relative;
		margin: 0 auto;
		padding: 30rpx;
		top: -200rpx;

		.context {
			display: flex;
			margin-top: 40rpx;

			.bot-name {
				font-size: 32rpx;
				font-weight: bold;
			}

			.bot-time {
				margin-top: 10rpx;
				font-size: 24rpx;
			}

			.bot-address {
				margin-top: 8rpx;
				font-size: 24rpx;
				color: #000;

				/* 小飞机图标 */
				.plane {
					width: 24rpx;
					margin-left: 16rpx;
				}
			}

			.right {
				margin-left: 80rpx;
				justify-content: center;
				align-items: center;
				margin-top: 32rpx;


			}



		}

	}

	.youjia-details {
		border-radius: 30rpx;
		width: 84%;
		background-color: #fff;
		margin: 0 auto;
		padding: 30rpx;
		position: relative;
		top: -120rpx;

		.font1 {
			font-size: 34rpx;
			font-weight: bold;
			margin-bottom: 20rpx;
		}

		.font2 {
			display: flex;
			justify-content: space-around;
			font-size: 30rpx;
			margin-top: 10rpx;
			margin-bottom: 20rpx;
			border-bottom: 1rpx solid rgba(229, 229, 229, 0.4);
		}
	}
</style>